Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xds: Use acceptResolvedAddresses() for PriorityLb children #11914

Merged
merged 1 commit into from
Feb 21, 2025

Conversation

ejona86
Copy link
Member

@ejona86 ejona86 commented Feb 20, 2025

PriorityLb should propagate config problems up to the name resolver so it can refresh.

CC @SreeramdasLavanya

PriorityLb should propagate config problems up to the name resolver so
it can refresh.
@ejona86 ejona86 requested a review from larry-safran February 20, 2025 23:16
Copy link
Contributor

@larry-safran larry-safran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since CdsLoadBalancer2 always calls handleResolvedAddresses and XdsNameResolver/NameResolver never call either [handle|accept]ResolvedAddresses, I believe that this return value will be ignored.

@ejona86
Copy link
Member Author

ejona86 commented Feb 21, 2025

The return code only matters to polling resolvers like DNS. XDS would do nothing with it, except potentially report the error back to the control plane for monitoring (control planes don't support this today, but maybe eventually). FWIW, XdsNameResolver wouldn't call handle/acceptResolvedAddresses, as that's in the LB API. The NR API has NameResolver.Listener2.onResult2() instead.

CDS doesn't matter as much as ClusterResolver today, as that is where the DNS resolver is. But you're changing CDS and ClusterResolver, so I'm not trying to retrofit them right now. After your changes, it could get plumbed all the way back to XdsDependencyManager.

But you are right that this isn't fully plumbed. But this is replacing LoadBalancer.canHandleEmptyAddressListFromNameResolution() which was also not really plumbed in the xds tree, because it wasn't compatible with hierarchical NRs where children change over time.

@ejona86 ejona86 merged commit 110c1ff into grpc:master Feb 21, 2025
16 checks passed
@ejona86 ejona86 deleted the priority-acceptresolvedaddresses branch February 21, 2025 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants